/* Author : Putri Andita R
 * 		    091511059
 * Proyek 4*/


package jtk.project4.fleet.field;

import java.awt.Dimension;
import java.awt.FlowLayout;

import nl.coderight.jazz.form.FormField;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.FormLayout.Resize;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.SelectField;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.button.PushButton;


public class TypeField extends GroupControl{
	private SelectField enabledField;
	private SelectField priorityField;
	private SelectField masterField;
	private ComboField typeField;
	private TextField leadTimeField;
	
			
	
	public TypeField(String bindID){
		setTitle("header.type");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	

	private void createFields() {
		// TODO Auto-generated method stub
		
				
		typeField = new ComboField<String>("domains","domain");
		typeField.setPreferredSize(new Dimension(165, 20));
		
		enabledField = new SelectField<String>("domains","domain");
		enabledField.setPreferredSize(new Dimension(165, 20));
		enabledField.insert("Yes", true);
		enabledField.insert("No", true);
		
		priorityField = new SelectField<String>("domains","domain");
		priorityField.setPreferredSize(new Dimension(165, 20));
		priorityField.insert("1-High", true);
		priorityField.insert("2-Medium", true);
		priorityField.insert("3-Low", true);
		
		masterField = new SelectField<String>("domains","domain");
		masterField.setPreferredSize(new Dimension(165, 20));
				
			
		
	}
	
	
	
	private void createLayout() {
		// TODO Auto-generated method stub
		
		
		setLayout(new FormLayout())
		
		
		.addLabel("label.type           ")				.addField(typeField)
		.addLabel("label.priority")			.addField(priorityField)
		.addRow()
		.addLabel("label.enabled?    ")     	.addField(enabledField)
		.addLabel("label.master")			.addField(masterField)
		;	
		
	}	
	
	
	
}
